<!doctype html>
<html lang="zh-CH">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>央票通</title>
	<link rel="stylesheet" href="./resource/css/index.css">
	<link rel="stylesheet" href="./resource/css/user_name.css">
</head>
<body>
<!-- 头部 -->
@include('common.index_head')
<!-- 个人中心 -->
<div class="cont-user">
	<div class="user-name">
		<div class="main">
			<div class="name-cont name-two">
				<div class="title">
					<span>验证码</span>
				</div>
				<div class="form">

						<div class="form-group form-code">
							<label for=""><span>*</span>短信验证码</label>
							<input type="text" class="form-control" placeholder="请输入短信验证码" name="verify" id="verify">
							{{--<input type="hidden" value="{{$info->bank_id}}" name="bank_id">--}}
							<input type="hidden" value="{{$param->yinhang}}" name="yinhang" id="yinhang">
							<input type="hidden" value="{{$param->myselect}}" name="myselect"  id="myselect">
							<input type="hidden" value="{{$info->mobile}}" name="phone"  id="phone">
							<input type="hidden" value="{{$info->real_name}}" name="realname"  id="realname">
							<input type="hidden" value="{{$param->bank_code}}" name="bank_code"  id="bank_code">
							<input type="hidden" value="{{$info->id_card}}" name="id_card"  id="id_card">
							<input type="hidden" value="{{$param->token}}" name="token"  id="token">
							<button class="code" onclick="Checknews()" >
								没收到？重新获取
							</button>
						</div>
						<button type="submit" class="btn btn-register" onclick="check_null()">确定</button>

				</div>
			</div>
		</div>
	</div>
</div>
<!-- footer -->
@include('common.index_foot')

<script>
	function check_null(){
		var verify = document.getElementById('verify').value;
		if(!verify){
			Showbo.Msg.nameauth("验证码不能为空",function(btn){
			})
			return false;
		}
		var  yinhang		=$("#yinhang").val();
		var  myselect		=$("#myselect").val();
		var  phone			=$("#phone").val();
		var  realname		=$("#realname").val();
		var  bank_code		=$("#bank_code").val();
		var  id_card		=$("#id_card").val();
		var  token			=$("#token").val();
		$.ajax({
			url : '/ajax_user_money',
			type : "POST",
			data : {myselect:myselect,yinhang:yinhang,phone:phone,bank_code:bank_code,realname:realname,id_card:id_card,token:token,verify:verify},
			dataType : "json",
			cache:"false",
			timeout:30000,
			success : function(json){
				if (json.code == 1) {//ok
					alert(json.mess);
					window.location.href = json.url;
					return false;
				} if (json.code == 2) {//ok
					alert(json.mess);
				}
			},

		});

	}

	function Checknews(){

		var  yinhang		=$("#yinhang").val();
		var  myselect		=$("#myselect").val();
		var  phone			=$("#phone").val();
		var  realname		=$("#realname").val();
		var  bank_code		=$("#bank_code").val();
		var  id_card		=$("#id_card").val();
		var  token			=$("#token").val();
		$.ajax({
			url : '/code_news',
			type : "POST",
			data : {myselect:myselect,yinhang:yinhang,phone:phone,bank_code:bank_code,realname:realname,id_card:id_card,token:token},
			dataType : "json",
			cache:"false",
			timeout:30000,
			success : function(json){
				if (json.code == 1) {//ok
					alert(json.mess);
					return false;
				} if (json.code == 2) {//ok
					alert(json.mess);
				}
			},

		});

	}


</script>
<script src="./resource/js/jquery-1.11.3.min.js"></script>
<script src="./resource/js/index.js"></script>
<script src="./resource/js/user_code.js"></script>
<script src="./resource/js/user.js"></script>
<script src="./resource/js/province_city.js"></script>
</body>
</html>